﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls.Primitives;
using System.Windows;
using System.Windows.Media;
using System.Windows.Controls;
using System.Diagnostics;


namespace proj4
{
    public class ThumbInfo
    {
        private static Random rnd = new Random();
        private int[] angles = { 0, 90, 180, 270 };
        public ThumbInfo(int x, int y, int _id, ref Thumb tb)
        {
            pt = new Point(x, y);
            angle = angles[rnd.Next(0, 4)];
            //Debug.WriteLine(angle);
            used = false;
            id = _id;

            ImageBrush ib = new ImageBrush();
            ib = (ImageBrush)tb.Background;

            RotateTransform transform = new RotateTransform();
            transform.CenterX = tb.Width / 2 - 2;
            transform.CenterY = tb.Height / 2 - 2;
            transform.Angle = angle;
            ib.Transform = transform;

            tb.Background = ib;
            
        }

        public Point pt{ get; set; }

        public int angle { get; set; }
        
        public int id { get; set; }

        public bool used { get; set; }
        

    }
}
